ComponentOne DataObjects for .NET
Fill(FilterConditions,String[]) Method

C1.Data.2 Assembly > C1.Data Namespace > C1DataSet Class > Fill Method : Fill(FilterConditions,String[]) Method
Filter conditions restricting the fetched rows of some of the data set table views.
Array of names specifying table views to be filled with data. Other table views are not changed.
Fills the data set with data fetching it from the database.
Syntax
'Declaration
 
Public Overloads Sub Fill( _
   ByVal filters As FilterConditions, _
   ByVal tableViewNames() As System.String _
) 
public void Fill( 
   FilterConditions filters,
   System.string[] tableViewNames
)

Parameters

filters
Filter conditions restricting the fetched rows of some of the data set table views.
tableViewNames
Array of names specifying table views to be filled with data. Other table views are not changed.
Remarks
If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results.

Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition (IsCustom = True) which can be an arbitrary string for use in BeforeFill event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch.

Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set.

If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched.

Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in BeforeFill event. BeforeFill event fires both on calling Fill and when the data set is filled at startup due to FillOnRequest = True. After filling the data set, C1DataObjects fires AfterFill event.

See Also

Reference

C1DataSet Class
C1DataSet Members
Overload List